<!--{eval $_G['home_tpl_titles'] = array('{lang rank}');}-->
<!--{template common/header}-->

<div id="pt" class="wp">
	<a href="index.php" class="nvhm">$_G[setting][bbname]</a> &rsaquo;
	<a href="$_G[setting][navs][4][filename]">$_G[setting][navs][4][navname]</a> &rsaquo; 
	<a href="home.php?mod=space&do=top">{lang friend_top}</a>
	
</div>

<style id="diy_style" type="text/css"></style>
<div class="wp">
	<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
</div>

<div id="ct" class="wp cl">
	<div class="mn">
		<div class="ch">
			<label class="wx"><a href="$_G[setting][navs][4][filename]">$_G[setting][navs][4][navname]</a></label>
		</div>
		<div class="bm">
			<h1 class="mt"><img alt="friend" src="{STATICURL}image/feed/friend.gif" class="vm" /> {lang friends}</h1>
			<ul class="tb cl">
				<li><a href="home.php?mod=space&uid=$space[uid]&do=friend">{lang friend_list}</a></li>
				<li><a href="home.php?mod=spacecp&ac=search">{lang search_friend}</a></li>
				<li><a href="home.php?mod=spacecp&ac=friend&op=find">{lang people_might_know}</a></li>
				<li><a href="home.php?mod=spacecp&ac=invite">{lang invite_friend}</a></li>
				<li><a href="home.php?mod=spacecp&ac=friend&op=request">{lang friend_request}</a></li>
				<li class="a"><a href="home.php?mod=space&do=top">{lang friend_top}</a></li>
			</ul>

			<div class="tbmu">
				<a href="home.php?mod=space&do=top"{$a_actives[show]}><span>{lang auction_ranking}</span></a><span class="pipe">|</span>
				<a href="home.php?mod=space&do=top&view=credit"{$a_actives[credit]}><span>{lang credit_ranking}</span></a><span class="pipe">|</span>
				<a href="home.php?mod=space&do=top&view=friendnum"{$a_actives[friendnum]}><span>{lang friend_num_ranking}</span></a><span class="pipe">|</span>
				<a href="home.php?mod=space&do=top&view=online"{$a_actives[online]}><span>{lang online_member}</span></a>
			</div>

			<script type="text/javascript">
				function checkCredit(id) {
					var maxCredit = parseInt($space[credit]);
					var idval = $(id).value;
					if(/^(\d+)$/.test(idval) == false) {
						alert("{lang credit_is_not_number}");
						return false;
					} else if(idval > maxCredit) {
						alert("{lang credit_title_message}");
						return false;
					} else if(idval < 1) {
						alert("{lang credit_title_error}");
						return false;
					}
					return true;
				}
			</script>

			<!--{if $now_pos >= 0}-->
			<div class="tbmu">
				<h3>{lang friend_top_note}:</h3>
				<!--{if $_GET[view]=='show'}-->
					<!--{if $space[showcredit]}-->
					{lang your_current_bid}{$extcredits[$creditid][title]}:$space[showcredit] {$extcredits[$creditid][unit]},{lang current_ranking} <span style="font-size:20px;color:red;">$now_pos</span> ,{lang make_persistent_efforts}!
					<!--{else}-->
					{lang ranking_message_0}
					<!--{/if}-->
					<br />{lang ranking_message_1}
					<br />{lang ranking_message_2}
				<!--{else}-->
					<!--{if $_GET[view]=='credit'}-->
					<a href="home.php?mod=spacecp&ac=credit">{lang self_current_credit}{$extcredits[$creditid][title]}:$space[credits]</a>
					<!--{elseif $_GET[view]=='friendnum'}-->
					<a href="home.php?mod=space&do=friend">{lang self_current_friend_num}:$space[friends]</a>
					<!--{/if}-->
					,{lang current_ranking} <span style="font-size:20px;color:red;">$now_pos</span> ,{lang make_persistent_efforts}!
				<!--{/if}-->
				<!--{if $cache_mode}-->
				<p>
					{lang top_100_update}
					<!--{if $filecachetime}-->{lang current_ranking_update_time}<!--{/if}-->
				</p>
				<!--{/if}-->
			</div>
			<!--{/if}-->

			<!--{template home/space_list}-->
		</div>

		<!--{if $_GET[view]=='show'}-->

			<!--{if $creditid}-->
			<div class="bm">
				<h2>{lang help_friend_in_top}</h2>
				<form method="post" autocomplete="off" action="home.php?mod=spacecp&ac=top" onsubmit="return checkCredit('stakecredit');">
					<table cellspacing="0" cellpadding="0" width="100%" class="tfm pns">
						<tr>
							<th>{lang friend_need_help}</th>
							<td><input type="text" name="fusername" class="px" style="width: auto;" value="" size="20" /></td>
						</tr>
						<tr>
							<th>{lang handsel_bid}{$extcredits[$creditid][title]}</th>
							<td>
								<input type="text" name="stakecredit" id="stakecredit" class="px vm" style="width: auto;" value="20" size="7" onblur="checkCredit('stakecredit');" />
								<button type="submit" name="friend_submit" class="pn vm"><em>{lang handsel}</em></button>
								<p class="d">{lang not_exceed}{$extcredits[$creditid][title]}: $space[credit] {$extcredits[$creditid][unit]}</p>
							</td>
						</tr>
					</table>
					<input type="hidden" name="friendsubmit" value="true" />
					<input type="hidden" name="formhash" value="{FORMHASH}" />
				</form>
			</div>
			<hr class="da" />
			<div class="bm">
				<h2>{lang i_ranking}</h2>
				<form method="post" autocomplete="off" action="home.php?mod=spacecp&ac=top" onsubmit="return checkCredit('showcredit');">
					<table cellspacing="0" cellpadding="0" class="tfm pns">
						<tr>
							<th>{lang my_ranking_declaration}</th>
							<td>
								<input type="text" name="note" class="px" style="width: auto;" value="" size="20" />
								<p class="d">{lang max_char_ranking}</p>
							</td>
						</tr>
						<tr>
							<th>{lang increase_bid}{$extcredits[$creditid][title]}</th>
							<td>
								<input type="text" id="showcredit" name="showcredit" class="px vm" style="width: auto;" value="100" size="7" onblur="checkCredit('showcredit');" />
								<button type="submit" name="show_submit" class="pn vm"><em>{lang increase}</em></button>
								<p class="d">{lang not_exceed}{$extcredits[$creditid][title]}: $space[credit] {$extcredits[$creditid][unit]}</p>
							</td>
						</tr>
					</table>
					<input type="hidden" name="showsubmit" value="true" />
					<input type="hidden" name="formhash" value="{FORMHASH}" /></form>
				</form>
			</div>
			<!--{else}-->
			<div class="mbm bbda emp">{lang close_ranking_note}</div>
			<!--{/if}-->
		<!--{/if}-->
	</div>
	<div class="sd">
		<!--{template common/userabout}-->

		<div class="drag">
			<!--[diy=diy2]--><div id="diy2" class="area"></div><!--[/diy]-->
		</div>
		
	</div>
</div>

<div class="wp mtn">
	<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
</div>

<!--{template common/footer}-->
